// DestroyProblem.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <windows.h>
#include <iostream>


int _tmain(int argc, _TCHAR* argv[])
{
    HMODULE handle = ::LoadLibrary(L"DllTest.dll");

    do
    {
        std::cout << "Enter 1 for exit\n";
        int a = 0;
        std::cin >> a;
        if (a == 1)
        {
            break;
        }
    }
    while(1);
    FreeLibrary(handle);
	std::cout << "DLL is unload" << std::endl;
	return 0;
}

